package ifpb.monteiro.p2.projetoFinal;

import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;

public class GUIEmbaralhar extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					GUIEmbaralhar frame = new GUIEmbaralhar();
					frame.setVisible(true);
//					GUITelaJogo.main(null);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 * 
	 * @throws InterruptedException
	 */
	public GUIEmbaralhar() throws InterruptedException {

		setUndecorated(true);
		setType(Type.POPUP);
		addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosed(WindowEvent e) {
			}
		});
		setVisible(true);
		setMinimumSize(new Dimension(640, 480));
		setPreferredSize(new Dimension(640, 480));
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setOpaque(false);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);

		JLabel Embaralhando = new JLabel("Embaralhando...");
		Embaralhando
		.setFont(new Font("Tekton Pro", Font.BOLD | Font.ITALIC, 25));
		Embaralhando.setHorizontalTextPosition(SwingConstants.CENTER);
		Embaralhando.setHorizontalAlignment(SwingConstants.CENTER);

		JLabel imgEmbaralhando = new JLabel("");
		imgEmbaralhando.setFont(new Font("Tempus Sans ITC", Font.PLAIN, 25));
		imgEmbaralhando.setIcon(new ImageIcon(GUIEmbaralhar.class
				.getResource("imagens/embaralhar.gif")));
		imgEmbaralhando.setHorizontalTextPosition(SwingConstants.CENTER);
		imgEmbaralhando.setHorizontalAlignment(SwingConstants.CENTER);
		GroupLayout gl_contentPane = new GroupLayout(contentPane);
		gl_contentPane
		.setHorizontalGroup(gl_contentPane
				.createParallelGroup(Alignment.LEADING)
				.addGroup(
						Alignment.TRAILING,
						gl_contentPane
						.createSequentialGroup()
						.addContainerGap(142, Short.MAX_VALUE)
						.addGroup(
								gl_contentPane
								.createParallelGroup(
										Alignment.LEADING)
										.addComponent(
												Embaralhando,
												GroupLayout.PREFERRED_SIZE,
												357,
												GroupLayout.PREFERRED_SIZE)
												.addGroup(
														Alignment.TRAILING,
														gl_contentPane
														.createSequentialGroup()
														.addPreferredGap(
																ComponentPlacement.RELATED,
																44,
																GroupLayout.PREFERRED_SIZE)
																.addComponent(
																		imgEmbaralhando,
																		GroupLayout.PREFERRED_SIZE,
																		253,
																		GroupLayout.PREFERRED_SIZE)
																		.addGap(60)))
																		.addGap(131)));
		gl_contentPane.setVerticalGroup(gl_contentPane.createParallelGroup(
				Alignment.LEADING).addGroup(
						Alignment.TRAILING,
						gl_contentPane
						.createSequentialGroup()
						.addContainerGap(163, Short.MAX_VALUE)
						.addComponent(imgEmbaralhando,
								GroupLayout.PREFERRED_SIZE, 133,
								GroupLayout.PREFERRED_SIZE)
								.addPreferredGap(ComponentPlacement.RELATED)
								.addComponent(Embaralhando, GroupLayout.PREFERRED_SIZE,
										47, GroupLayout.PREFERRED_SIZE).addGap(121)));
		contentPane.setLayout(gl_contentPane);
	}

}
